import { createRouter, createWebHistory } from 'vue-router'
import loginView from '../views/login/index.vue'
import registerView from '../views/login/register.vue'
import homeView from '../views/home/index.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { path: '/', redirect: '/login' },
    {
      path: '/login', name: 'login', component: loginView,
    },
    {
      path: '/register', name: 'register', component: registerView,
    },
    {
      path: '/home', name: 'home', component: homeView,
    },
  ],
})

export default router
